<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户登录</title>
<%
	String path = request.getContextPath();
	request.setAttribute("path", request.getContextPath());
	request.setAttribute("jsPath", path+"/js");
%>
<link href="${path}/images/login.css" rel="stylesheet" type="text/css" />
</head>
<script type="text/javascript" src="${path}/js/jquery.min.js"></script>
<script type="text/javascript">
	$(function(){
		$(".login-btn").click(function(){
			var username = $("#username").val().trim();
			var password = $("#password").val().trim();
			if(username==null||username==''||password==null||password==''){
				alert("用户名或密码不能为空！");
				return false;
			}
		});
	});
	$(function(){
		var msg = $("#msg").html();
		if(msg != null){
			alert(msg);
		}
	});
</script>
<body>
<c:if test="${not empty msg}"><p style="display:none" id="msg">${msg}</p></c:if>
<div id="wrap">
	<div id="header">用户管理系统</div>
    <div id="content-wrap">
    	<div class="space"> </div>
   	  <form action="${path}/global/login" method="post"><div class="content">
        <div class="field"><label>账　户：</label><input class="username" id="username" value="${staff.staffNum}" name="username" type="text"/></div>
		<div class="field"><label>密　码：</label><input class="password" id="password" name="password" type="password"/><br /></div>
        <div class="btn"><input name="" type="submit" class="login-btn" value="" /></div>
      </div></form>
    </div>
    <div id="footer"></div>
</div>
</body>
</html>
